import { getToken } from "@/utils/auth";
export default function(to, from, next) {
  const token = getToken();
  //判断没有token直接跳转登录页
  if (to.path !== "/login" && !token) {
    next({
      name: "Login"
    });
    return;
  }
  next();
}
